home *** CD-ROM | disk | FTP | other *** search
/ CU Amiga Super CD-ROM 14 / CU Amiga Magazine's Super CD-ROM 14 (1997)(EMAP Images)(GB)(Track 1 of 3)[!][issue 1997-09].iso / CUCD / Programming / Mesa-2.2 / include / GL / svgamesa.h < prev    next >
Encoding:
C/C++ Source or Header  |  1996-10-30  |  2.5 KB  |  105 lines

  1. /* $Id: svgamesa.h,v 1.3 1996/10/30 03:12:47 brianp Exp $ */
  2.  
  3. /*
  4.  * Mesa 3-D graphics library
  5.  * Version:  2.1
  6.  * Copyright (C) 1995-1996  Brian Paul
  7.  *
  8.  * This library is free software; you can redistribute it and/or
  9.  * modify it under the terms of the GNU Library General Public
  10.  * License as published by the Free Software Foundation; either
  11.  * version 2 of the License, or (at your option) any later version.
  12.  *
  13.  * This library is distributed in the hope that it will be useful,
  14.  * but WITHOUT ANY WARRANTY; without even the implied warranty of
  15.  * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
  16.  * Library General Public License for more details.
  17.  *
  18.  * You should have received a copy of the GNU Library General Public
  19.  * License along with this library; if not, write to the Free
  20.  * Software Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
  21.  */
  22.  
  23.  
  24. /*
  25.  * $Log: svgamesa.h,v $
  26.  * Revision 1.3  1996/10/30 03:12:47  brianp
  27.  * incremented version to 2.1
  28.  *
  29.  * Revision 1.2  1996/10/15 00:26:02  brianp
  30.  * added prototype for SVGAMesaSwapBuffers()
  31.  *
  32.  * Revision 1.1  1996/09/13 01:26:41  brianp
  33.  * Initial revision
  34.  *
  35.  */
  36.  
  37.  
  38.  
  39. /*
  40.  * SVGA/Mesa interface for Linux.
  41.  */
  42.  
  43.  
  44. /*
  45.  * Intro to using the VGA/Mesa interface
  46.  *
  47.  * 1. #include the <vga.h> file
  48.  * 2. Call vga_init() to initialize the SVGA library.
  49.  * 3. Call vga_setmode() to specify the screen size and color depth.
  50.  * 4. Call SVGAMesaCreateContext() to setup a Mesa context.  If using 8-bit
  51.  *    color Mesa assumes color index mode, if using 16-bit or deeper color
  52.  *    Mesa assumes RGB mode.
  53.  * 5. Call SVGAMesaMakeCurrent() to activate the Mesa context.
  54.  * 6. You can now use the Mesa API functions.
  55.  * 7. Before exiting, call SVGAMesaDestroyContext() then vga_setmode(TEXT)
  56.  *    to restore the original text screen.
  57.  *
  58.  * Notes
  59.  * 1. You must run your executable as root (or use the set UID-bit) because
  60.  *    the SVGA library requires it.
  61.  * 2. The SVGA driver is not fully implemented yet.  See svgamesa.c for what
  62.  *    has to be done yet.
  63.  */
  64.  
  65.  
  66. #ifndef SVGAMESA_H
  67. #define SVGAMESA_H
  68.  
  69.  
  70. #define SVGAMESA_MAJOR_VERSION 2
  71. #define SVGAMESA_MINOR_VERSION 1
  72.  
  73.  
  74.  
  75. #ifdef __cplusplus
  76. extern "C" {
  77. #endif
  78.  
  79.  
  80. /*
  81.  * This is the SVGAMesa context 'handle':
  82.  */
  83. typedef struct svgamesa_context *SVGAMesaContext;
  84.  
  85.  
  86.  
  87. extern SVGAMesaContext SVGAMesaCreateContext( void );
  88.  
  89. extern void SVGAMesaDestroyContext( SVGAMesaContext ctx );
  90.  
  91. extern void SVGAMesaMakeCurrent( SVGAMesaContext ctx );
  92.  
  93. extern SVGAMesaContext SVGAMesaGetCurrentContext( void );
  94.  
  95. extern void SVGAMesaSwapBuffers( void );
  96.  
  97.  
  98. #ifdef __cplusplus
  99. }
  100. #endif
  101.  
  102.  
  103. #endif
  104.  
  105.